Skip to content

🌱 generalize tools Dockerfiles for arm64, ppc64le linux builds #1992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

estroz
Copy link
Contributor

@estroz estroz commented Feb 4, 2021

  • */Dockerfile: generalize for multiple platforms
  • build/cloudbuild_tools.yaml: update with new Dockerfile args, prettify
  • README.md: add new arches

Note: this PR also downgrades k8s version to v1.19.2 so arm64 and ppc64le builds occur for a v1.19 version. I will post a follow-up PR to upgrade the version back to v1.20.2 after this is merged.

Closes #966

Signed-off-by: Eric Stroczynski [email protected]

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 4, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 4, 2021
@estroz
Copy link
Contributor Author

estroz commented Feb 4, 2021

/cc @DirectXMan12 @Adirio

- 'GOOS=${_GOOS}'
- 'GOARCH=${_GOARCH}'
images: ["gcr.io/kubebuilder/thirdparty-${_GOOS}:1.20.2"]
- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}-${_GOARCH}:${_KUBERNETES_VERSION}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep something around that cross-tags this to the old thirdparty-${OS} format too, so we don't confuse people? (this is a question, not a suggestion -- I can't quite convince myself either way)

Copy link
Contributor Author

@estroz estroz Feb 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this image intended to be pulled/used outside of this build system? If so then I don’t think the old format should be kept around because it is now ambiguous.

EDIT: actually for v1.19 I think we can make an exception because released kubebuilder projects already use the old format.

Copy link
Contributor

@Adirio Adirio Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: nevermind, we are distributing tarballs, not docker images. Docker is just used as the build environment.

args: [
"-h", "Content-Type:application/gzip",
"cp",
"/workspace/kubebuilder-tools-${_KUBERNETES_VERSION}-${_GOOS}-${_GOARCH}.tar.gz",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto here.

In either case, will need to update the go.kubebuilder.io shortlinks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tarball name format hasn't changed, and if it has it shouldn't have since it already includes os and arch.

Copy link
Contributor

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idea is generally fine, couple of questions inline

@estroz estroz force-pushed the chore/arm64-tools branch from 0dc0a18 to 4f928d1 Compare February 8, 2021 23:32
build/cloudbuild_tools.yaml: update with new Dockerfile args, prettify

README.md: add new arches

Signed-off-by: Eric Stroczynski <[email protected]>
Comment on lines +18 to +19
- `_GOARCH=arm64 _GOOS=linux`
- `_GOARCH=ppc64le _GOOS=linux`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this need to be listed somewhere else? I mean you will need to configure this list of os/arch somewhere (maybe not in code though).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think @DirectXMan12 needs to update these vars in gcloud.

Copy link
Contributor

@Adirio Adirio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 9, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio, estroz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 791fa7c into kubernetes-sigs:tools-releases Feb 9, 2021
@estroz estroz deleted the chore/arm64-tools branch February 9, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants